package at.kaok.gui.panels;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JPanel;

import at.kaok.gui.BetFrame;

public class MenuePanel extends JPanel implements ActionListener{

	JButton btnAnaliesbyMId;
	JButton btnSelectGame;
	public MenuePanel() {
		this.setSize(500,150);
		btnAnaliesbyMId = new JButton("Analise by MarketId");
		btnAnaliesbyMId.setBounds(5, 20, 50, 25);
		btnAnaliesbyMId.addActionListener(this);
		this.add(btnAnaliesbyMId);
		
		btnSelectGame = new JButton("Select Game");
		btnSelectGame.setBounds(50, 20, 50, 25);
		btnSelectGame.addActionListener(this);
		this.add(btnSelectGame);
		
	}
	@Override
	public void actionPerformed(ActionEvent e) {
		if(e.getSource().equals(btnAnaliesbyMId)){
			
			BetFrame.getInstance().setMainPanel(new AnaliseByMarketIdPanel());
		} else if(e.getSource().equals(btnSelectGame)){
			
			BetFrame.getInstance().setMainPanel(new SelectGamePanel());
		}
		
	}
}
